import "./assets/style/main.css";
import "./styles/element-variables.css";

import { createApp } from "vue";
import { createPinia } from "pinia";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

import App from "./App.vue";
import router from "./router";
// 简单导入 microApp
import microApp from '@micro-zoe/micro-app'

// 启动 microapp
microApp.start({
  'disable-memory-router': true,
  'disable-patch-request': true,
})

const app = createApp(App)

// 移除这段运行时配置，因为 Vite 配置已经处理了
// app.config.compilerOptions.isCustomElement = (tag) => {
//   return tag === 'micro-app'
// }

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.use(createPinia());
app.use(router);
app.use(ElementPlus);

app.mount("#app");
